/* Copyright 203-2115 AtomWare Technology Pty Limited
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 * The flowing information must be keep 
 * IndexedNoSqlEntity.java
 * identity
 * 2014年3月12日下午2:12:32
 * @author 屈甲康
 * QQ285799123
 * mailto:qujiakang@gmail.com
 */

package org.jackysoft.entity.nosql;


import org.hibernate.validator.constraints.NotEmpty;
import org.joda.time.DateTime;
import org.mongodb.morphia.annotations.Embedded;

public abstract class IndexedNoSqlEntity extends AbstractNoSqlEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3753842826298525602L;
	
	public String name;

	public DateTime updateDate;

	public long dueTime;
	
	public String relativePath;

	public String realName;

	public String digest;
	
	public String content;
	
	public  boolean local;
	public int newsType;

	@Embedded
	public NameValuePair owner;
	
	
	
	public IndexedNoSqlEntity() {
		super();
		
	}

	public IndexedNoSqlEntity(String name, String relativePath, String digest) {
		super();
		this.name = name;
		this.relativePath = relativePath;
		this.digest = digest;
	}   
	
	
	@NotEmpty(message="名称不能为空")
	public String getName() {
		return name;
	}

	public DateTime getUpdateDate() {
		return updateDate;
	}

	public String getRelativePath() {
		return relativePath;
	}

	public String getRealName() {
		return realName;
	}

	public String getDigest() {
		return digest;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setUpdateDate(DateTime updateDate) {
		this.updateDate = updateDate;
	}

	public void setRelativePath(String relativePath) {
		this.relativePath = relativePath;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public void setDigest(String digest) {
		this.digest = digest;
	}

	public NameValuePair getOwner() {
		return owner;
	}

	public void setOwner(NameValuePair owner) {
		this.owner = owner;
	}

	public long getDueTime() {
		return dueTime;
	}

	public void setDueTime(long dueTime) {
		this.dueTime = dueTime;
	}
	
	public int getNewsType() {
		return newsType;
	}

	public void setNewsType(int newsType) {
		this.newsType = newsType;
	}

	public boolean isLocal() {
		return local;
	}

	public void setLocal(boolean local) {
		this.local = local;
	}

	
	@NotEmpty(message="内容不能为空")
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}   
	
}
